package com.hongfeng.support.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.hongfeng.support.model.common.BaseEntity;

/**
 * 
 * <菜单类>
 *
 * @author llc
 * @date 创建时间：2012-12-5 下午04:38:18
 */
@Entity
@Table(name = "sys_menu")
public class Menu extends BaseEntity {

	private static final long serialVersionUID = -454596696708886792L;

	@Id
	@GeneratedValue
	@Column(name = "id")
	private Long id;
	// 菜单名
	@Column(name = "menuname", length = 20, nullable = false)
	private String menuName;
	// 菜单编码
	@Column(name = "menucode", length = 20, nullable = false)
	private String menuCode;
	// 菜单地址
	@Column(name = "menuurl", length = 100, nullable = false)
	private String menuUrl;
	// 父菜单ID
	@Column(name = "pid")
	private Long pid;
	// 备注
	@Column(name = "memo", length = 200)
	private String memo;

	@Transient
	private Menu parentMenu;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getMenuName() {
		return menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	public String getMenuCode() {
		return menuCode;
	}

	public void setMenuCode(String menuCode) {
		this.menuCode = menuCode;
	}

	public String getMenuUrl() {
		return menuUrl;
	}

	public void setMenuUrl(String menuUrl) {
		this.menuUrl = menuUrl;
	}

	public Long getPid() {
		return pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public Menu getParentMenu() {
		return parentMenu;
	}

	public void setParentMenu(Menu parentMenu) {
		this.parentMenu = parentMenu;
	}

}
